<?php
/**
 * Created by PhpStorm.
 * User: Digvijay
 * Date: 3/21/14
 * Time: 10:02 PM
 */

class Dashbord extends MY_Controller {
    function index() {
        $data = array("filename"=> "Dashbord");
        $this->load->view("dashbord", $data);
    }

    function activities(){
        if (!$this->input->is_ajax_request()) {
            show_404();
            return;
        }
        $userActivities = $this->getUserActivities();
        echo json_encode($userActivities);
    }

    function recentActivity($id = null){
        if (!$this->input->is_ajax_request()) {
            show_404();
            return;
        }
        $userActivities = $this->getUserActivitiesGreaterThan($id);
        echo json_encode($userActivities);
    }
} 